package com.ruoyi.framework.reptile.webmagic.jingcai.basketball;

import com.alibaba.fastjson.JSON;
import com.ruoyi.framework.reptile.webmagic.jingcai.basic.result.basketball.BasketBallResultRoot;
import us.codecraft.webmagic.ResultItems;
import us.codecraft.webmagic.Task;
import us.codecraft.webmagic.pipeline.Pipeline;

/**
 * @author dzl
 * @Description TODO
 * @date 2024年07月09日 21:33:00
 */
public class JingCaiBasketBallResultPipeline implements Pipeline {
    @Override
    public void process(ResultItems resultItems, Task task) {
        String jcData = resultItems.get("jcData").toString();
        BasketBallResultRoot root = JSON.parseObject(jcData, BasketBallResultRoot.class);
        System.out.println(JSON.toJSONString(root));
    }
}
